package com.lhb.boyixue.base;

/**
 * @author 86131
 * @version 1.0
 * @description 本地线程
 * @date 2025/4/24 下午8:20
 */
public class BaseContext {
    private static final ThreadLocal<Long> threadLocal = new ThreadLocal<>();
    public static void setUserId(Long userId) {threadLocal.set(userId);}
    public static Long getUserId() {return  threadLocal.get();}
    public static void removeUserId() {threadLocal.remove();}

}
